#import <Foundation/Foundation.h>


@interface FileDownloader : NSObject {
//This function is used to download mail attachments.
	NSString* attachmentURL;// the URL to download the attatchment
	NSString* filePath;//filePath to save the attachment
	NSString* _sessionCookie;// the cookie to pass the security validation.
	NSMutableData* receivedData;//Attatchment data
}

- (FileDownloader *)initWithString:(NSString*)url filename:(NSString*)name cookie:(NSString*)cookie;

- (void)startDownloadingURL;
/*
 This function will create a loop to receive data, when it ends, it will call
- (void)connectionDidFinishLoading:(NSURLConnection *)connection  or
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
*/

@end
